import http from '@/utils/request'

//添加菜品
export const addCateApi = (data) => {
  return http({
    url: '/category/add',
    method: 'post',
    data
  })
}

//查询菜品分类
export const selectCateApi = (params) => {
  return http({
    url: '/category/select',
    method: 'get',
    params
  })
}

//查询菜品id查询详情
export const getCategoryDetailByIdApi = (id) => {
  return http({
    url: `/category/${id}`,
    method: 'get',
  })
}

//更新菜品信息
export const updateCategoryDetailApi = (data) => {
  return http({
    url: '/category',
    method: 'put',
    data
  })
}